package com.carl.study.jooq.doc;

import org.bson.types.ObjectId;
import org.mongodb.morphia.annotations.Entity;
import org.mongodb.morphia.annotations.Id;
/**
 * @program: FrameStudy
 * @description:
 * @author: Mr.Carl
 **/
@Entity("person")
public class PersonDoc {
    @Id
    private ObjectId id;
    private String name;
    private int age;
    private String sex;
    private String address;

    public PersonDoc() {}

    public PersonDoc(String name, int age, String gender,String address) {
        this.name = name;
        this.age = age;
        this.sex = gender;
        this.address = address;
    }

    // getters and setters
    // ...

    @Override
    public String toString() {
        return "Person{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", gender='" + sex + '\'' +
                ", address=" + address +
                '}';
    }
}
